package com.lkqm.seckill.dto;

import com.lkqm.seckill.dictionary.SeckillStateEnum;
import com.lkqm.seckill.entity.SuccessKilled;

/**
 * 秒杀执行结果DTO
 * Created by luokaiqiongmou on 2016/11/27.
 */
public class SeckillExecution {

    /** 秒杀执行结果 */
    private int state;
    /** 执行信息 */
    private String stateInfo;
    /** 秒杀成功的详细 */
    private SuccessKilled successKilled;

    public SeckillExecution(SeckillStateEnum stateEnum, SuccessKilled successKilled) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.successKilled = successKilled;
    }

    public SeckillExecution(SeckillStateEnum stateEnum) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public SuccessKilled getSuccessKilled() {
        return successKilled;
    }

    public void setSuccessKilled(SuccessKilled successKilled) {
        this.successKilled = successKilled;
    }
}
